<div class="modal" ng-controller="EditModelPopupCtrl">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
            	<h2>{{'PROCESS.POPUP.EDIT-TITLE' | translate}}</h2>
            </div>
            <div class="modal-body">
            	<p>{{'PROCESS.POPUP.EDIT-DESCRIPTION' | translate}}</p>
            	<div ng-if="popup.errorMessage && popup.errorMessage.length > 0" class="alert error" style="font-size: 14px; margin-top:20px">
                  <div class="popup-error" style="font-size: 14px">
                    <span class="glyphicon glyphicon-remove-circle"></span>
                    <span>{{popup.errorMessage}}</span>
                  </div>
                </div>
            	<div class="form-group">
            	    <label for="editProcessName">{{'PROCESS.NAME' | translate}}</label>
            	    <input ng-disabled="popup.loading" type="text" class="form-control"
                           id="editProcessName" ng-model="popup.modelName" autofocus editor-input-check>
            	</div>
            	<div class="form-group">
            	    <label for="editProcessKey">{{'PROCESS.KEY' | translate}}</label>
            	    <input ng-disabled="popup.loading" type="text" class="form-control"
                           id="editProcessKey" ng-model="popup.modelKey" editor-input-check>
            	</div>
            	<div class="form-group">
            	    <label for="editPocessDescription">{{'PROCESS.DESCRIPTION' | translate}}</label>
            		<textarea ng-disabled="popup.loading" class="form-control" id="editProcessDescription" rows="5" ng-model="popup.modelDescription"></textarea>
            	</div>
            </div>

            <div class="modal-footer">
            	<div class="pull-right">
            		<button type="button" class="btn btn-sm btn-default" ng-click="ok()" ng-disabled="popup.loading || !popup.modelName || popup.modelName.length == 0 || !popup.modelKey || popup.modelKey.length == 0">
            			{{'PROCESS.ACTION.EDIT-CONFIRM' | translate}}
            		</button>
					<button type="button" class="btn btn-sm btn-default" ng-click="cancel()" ng-disabled="popup.loading" auto-focus>
						{{'GENERAL.ACTION.CANCEL' | translate}}
					</button>
            	</div>
            	<div class="loading pull-right" ng-show="popup.loading">
            		<div class="l1"></div><div class="l2"></div><div class="l2"></div>
            	</div>
            </div>
        </div>
    </div>
</div>
